package sample.student;

import controller.student.StudentClassTableController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class StudentClassTable extends Application {
    String username="";

    public StudentClassTable(String u){
        username=u;
    }
    public StudentClassTable(){

    }
    public  void start(Stage primarystage){
        try{
            FXMLLoader fxLoader = new FXMLLoader(getClass().getResource("/fxml/student/学生我的课表.fxml"));
            Parent root = fxLoader.load();
            Scene sc;
            sc= new Scene(root,705,446);
            StudentClassTableController studentClassTableController = fxLoader.getController();
            studentClassTableController.update(this.username); //将用户传入 只搜 用户相关de课

            primarystage.setScene(sc);
            primarystage.setResizable(false);
            primarystage.setTitle("学生端");
            primarystage.show();

        }catch (Exception e){
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        launch(args);
    }
}
